﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// wx_ServOrder数据模型对象
    /// </summary>
    [Serializable]
    public partial class wx_ServOrderMod
    {
        /// <summary>
        /// 初始化wx_ServOrder数据模型对象
        /// </summary>
        public wx_ServOrderMod()
        {
            
        }
        /// <summary>
        /// 初始化wx_ServOrder数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="preid">preid</param>
        /// <param name="openid">openid</param>
        /// <param name="servid">servid</param>
        /// <param name="price">price</param>
        /// <param name="ttime">ttime</param>
        /// <param name="bstate">bstate</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="stime">stime</param>
        /// <param name="etime">etime</param>
        public wx_ServOrderMod(string preid,string openid,string servid,decimal price,DateTime ttime,int bstate,string deviceNo,DateTime stime,DateTime etime)
        {
            //给preid字段赋值
            this.Preid = preid;
            //给openid字段赋值
            this.Openid = openid;
            //给servid字段赋值
            this.Servid = servid;
            //给price字段赋值
            this.Price = price;
            //给ttime字段赋值
            this.Ttime = ttime;
            //给bstate字段赋值
            this.Bstate = bstate;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给stime字段赋值
            this.Stime = stime;
            //给etime字段赋值
            this.Etime = etime;
        }
        /// <summary>
        /// 初始化wx_ServOrder数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="preid">preid</param>
        /// <param name="openid">openid</param>
        /// <param name="servid">servid</param>
        /// <param name="price">price</param>
        /// <param name="ttime">ttime</param>
        /// <param name="bstate">bstate</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="stime">stime</param>
        /// <param name="etime">etime</param>
        /// <param name="remark">remark</param>
        public wx_ServOrderMod(string preid,string openid,string servid,decimal price,DateTime ttime,int bstate,string deviceNo,DateTime stime,DateTime etime,string remark)
        {
            //给preid字段赋值
            this.Preid = preid;
            //给openid字段赋值
            this.Openid = openid;
            //给servid字段赋值
            this.Servid = servid;
            //给price字段赋值
            this.Price = price;
            //给ttime字段赋值
            this.Ttime = ttime;
            //给bstate字段赋值
            this.Bstate = bstate;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给stime字段赋值
            this.Stime = stime;
            //给etime字段赋值
            this.Etime = etime;
            //给remark字段赋值
            this.Remark = remark;
        }
        
		//属性存储数据的变量
        private string _preid;
        private string _openid;
        private string _servid;
        private decimal _price;
        private DateTime _ttime;
        private int _bstate;
        private string _deviceNo;
        private DateTime _stime;
        private DateTime _etime;
        private string _remark;
        
        /// <summary>
        /// preid
        /// </summary>
        public string Preid
        {
            get { return this._preid; }
            set { this._preid = value; }
        }
        /// <summary>
        /// openid
        /// </summary>
        public string Openid
        {
            get { return this._openid; }
            set { this._openid = value; }
        }
        /// <summary>
        /// servid
        /// </summary>
        public string Servid
        {
            get { return this._servid; }
            set { this._servid = value; }
        }
        /// <summary>
        /// price
        /// </summary>
        public decimal Price
        {
            get { return this._price; }
            set { this._price = value; }
        }
        /// <summary>
        /// ttime
        /// </summary>
        public DateTime Ttime
        {
            get { return this._ttime; }
            set { this._ttime = value; }
        }
        /// <summary>
        /// bstate
        /// </summary>
        public int Bstate
        {
            get { return this._bstate; }
            set { this._bstate = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// stime
        /// </summary>
        public DateTime Stime
        {
            get { return this._stime; }
            set { this._stime = value; }
        }
        /// <summary>
        /// etime
        /// </summary>
        public DateTime Etime
        {
            get { return this._etime; }
            set { this._etime = value; }
        }
        /// <summary>
        /// remark
        /// </summary>
        public string Remark
        {
            get { return this._remark; }
            set { this._remark = value; }
        }
        
        /// <summary>
        /// 对比两个wx_ServOrder数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的wx_ServOrder数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成wx_ServOrder数据模型对象
            wx_ServOrderMod wx_ServOrderMod = obj as wx_ServOrderMod;
            //判断是否转换成功
            if (wx_ServOrderMod == null) return false;
            //进行匹配属性的值
            return
                //判断preid是否一致
                this.Preid == wx_ServOrderMod.Preid &&
                //判断openid是否一致
                this.Openid == wx_ServOrderMod.Openid &&
                //判断servid是否一致
                this.Servid == wx_ServOrderMod.Servid &&
                //判断price是否一致
                this.Price == wx_ServOrderMod.Price &&
                //判断ttime是否一致
                this.Ttime == wx_ServOrderMod.Ttime &&
                //判断bstate是否一致
                this.Bstate == wx_ServOrderMod.Bstate &&
                //判断DeviceNo是否一致
                this.DeviceNo == wx_ServOrderMod.DeviceNo &&
                //判断stime是否一致
                this.Stime == wx_ServOrderMod.Stime &&
                //判断etime是否一致
                this.Etime == wx_ServOrderMod.Etime &&
                //判断remark是否一致
                this.Remark == wx_ServOrderMod.Remark;
        }
        /// <summary>
        /// 将当前wx_ServOrder数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将wx_ServOrder数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将preid进行按位异或运算处理
                (this.Preid == null ? 2147483647 : this.Preid.GetHashCode()) ^
                //将openid进行按位异或运算处理
                (this.Openid == null ? 2147483647 : this.Openid.GetHashCode()) ^
                //将servid进行按位异或运算处理
                (this.Servid == null ? 2147483647 : this.Servid.GetHashCode()) ^
                //将price进行按位异或运算处理
                this.Price.GetHashCode() ^
                //将ttime进行按位异或运算处理
                this.Ttime.GetHashCode() ^
                //将bstate进行按位异或运算处理
                this.Bstate.GetHashCode() ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将stime进行按位异或运算处理
                this.Stime.GetHashCode() ^
                //将etime进行按位异或运算处理
                this.Etime.GetHashCode() ^
                //将remark进行按位异或运算处理
                (this.Remark == null ? 2147483647 : this.Remark.GetHashCode());
        }
        /// <summary>
        /// 将当前wx_ServOrder数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前wx_ServOrder数据模型对象转换成字符串副本
            return
                "[" +
                //将preid转换成字符串
                this.Preid + "," +
                //将openid转换成字符串
                this.Openid + "," +
                //将servid转换成字符串
                this.Servid + "," +
                //将price转换成字符串
                this.Price + "," +
                //将ttime转换成字符串
                this.Ttime + "," +
                //将bstate转换成字符串
                this.Bstate + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将stime转换成字符串
                this.Stime + "," +
                //将etime转换成字符串
                this.Etime +
                "]";
        }
    }
}
